<template>
    <div class="p-article">
        <header>
            <h1>{{items.name}}</h1>
            <div class="tips">
                <span>{{items.createtime}}</span><span>{{items.source}}</span>
            </div>
        </header>
        <main>
            <div class="text-container" v-html="items.content">

            </div>
        </main>
    </div>
</template>
<style lang="scss" src='./index.scss' scoped></style>
<style lang="scss">
    .text-container{
        p{font-size: 28px;line-height: 1.4;}
        img{width: 100%;margin: 40px 0;}
    }
</style>


<script>
    import {RequestGet} from '@/api/http.js'
    export default {
        mounted(){
            RequestGet({url:'https://www.aischolar.com/mobile/category/getcontent',val:{id:this.$route.params.id}})
                .then(res=>{
                    this.items = res.data.data
                })
        },
        data:function(){
            return{
                items: []
            }
        }
    }
</script>
